home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
x2ftp
/
msdos
/
libs
/
knowhow4
/
frame.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1994-10-10
|
2KB
|
78 lines
#include "frame.h"
Frame::Frame(rect coordinates, BORDERS b_type, int s, int t)
{
tog = t;
rectangle = coordinates;
shadow = s;
border_type = b_type;
}
///////////////////
void Frame::show()
{
rect ltrb;
ltrb = tog ? rectangle : screenRect(rectangle);
Carcase::show(border_type, ltrb, shadow);
Shadow::show(ltrb, shadow);
}
////////////////////
void Frame::hilite()
{
rect ltrb;
ltrb = tog ? rectangle : screenRect(rectangle);
Carcase::show(HILITE_BORDER, ltrb, shadow);
}
//////////////////////
void Frame::unhilite()
{
rect ltrb;
ltrb = tog ? rectangle : screenRect(rectangle);
Carcase::show(border_type, ltrb, shadow);
}
//////////////////////
void Frame::press()
{
rect ltrb;
ltrb = tog ? rectangle : screenRect(rectangle);
Carcase::show(PRESS_BORDER, ltrb, shadow);
}
//////////////////////
void Frame::release()
{
Frame::show();
Frame::hilite();
}
//////////////////////
/*
void demo()
{
setfillstyle(SOLID_FILL, pColorSet->colors.BAK_COLOR);
bar(0, 0, getmaxx(), getmaxy());
Frame f(rect(10, 10, 100, 50), BUTTON_BORDER, 6, SCREEN);
f.show();
Frame f1(rect(10, 110, 100, 150), STANDART_BORDER, 6, SCREEN);
f1.show();
Frame f2(rect(10, 160, 100, 200), SHOW_BORDER, 6, SCREEN);
f2.show();
Frame f3(rect(1, 20, 60, 25), PRESS_BORDER, 6, TEXT);
f3.show();
f.hilite();
f.press();
f.release();
f.unhilite();
}
void main()
{
if(!init_KNOW_HOW())
return;
demo();
pColorSet->loadColorSet(1);
demo();
pColorSet->loadColorSet(2);
demo();
close_KNOW_HOW();
closegraph();
}
*/